package com.jjy.admin.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.jjy.common.domain.BaseEntity;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;


/**
 * 角色表 sys_role
 *
 * @author jjy
 */
@TableName("jobs")
@EqualsAndHashCode(callSuper = true)
@Data
@AllArgsConstructor
@NoArgsConstructor
public class JobEntity extends BaseEntity {
    private static final long serialVersionUID = 1L;

    /**
     * 角色ID
     */
    @TableId(type = IdType.AUTO)
    private Long id;

    /**
     * 职位名称
     */
    private String jobName;
    private String jobArea;
    private String province;
    private String city;
    private String experience;
    private String degree;
    private String jobSalaryMin;
    private String jobSalaryMax;
    private String industryType1;
    private String companyName;
    private String jobTags;
    private String provideSalary;
    private String industryType1Id;
    private String industryType2;
    private String industryType2Id;
    private String fullCompanyName;
    private String companyType;
    private String companySize;
    private String jobHref;
    private String jobDescribe;



    public JobEntity(Long roleId) {
        this.id = roleId;
    }

    public boolean isAdmin() {
        return isAdmin(this.id);
    }

    public static boolean isAdmin(Long jobId) {
        return jobId != null && 1L == jobId;
    }

}
